<template>
  <div>
    我是app组件
    {{ num }}
    <p>{{ double }}</p>
    <button @click="count.add()">点我加数据</button>
    <button @click="count.toAdd()">过一秒在加数据</button>
  </div>
</template>

<script setup>
import { storeToRefs } from 'pinia';
import useCountStore from './stores/counter';

  const count = useCountStore()

  const { num,double } = storeToRefs(count)
</script>

<style lang="scss" scoped>

</style>